package _992ZhuangTai;

import _992ZhuangTai.impl.StartState;
import _992ZhuangTai.impl.StopState;

/**
 * @Test: 状态模式 测试类
 * @author: ZBoHang
 * @time: 2021/9/17 16:11
 */
class Test {
    public static void main(String[] args) {
        Context context = new Context();

        StartState startState = new StartState();
        startState.doAction(context);

        System.out.println(context.getState().toString());

        StopState stopState = new StopState();
        stopState.doAction(context);

        System.out.println(context.getState().toString());
    }
}
